/*
 * @Author: cl
 * @Description: token相关
 * @Date: 2023-05-04 09:05:49
 * @LastEditTime: 2023-05-04 09:11:41
 * @FilePath: \vue3\src\utils\auth.ts
 * @LastEditors: cl
 */
import Cookies from "js-cookie";

const TokenKey = "my-vue3-Token";

export function getToken(): string {
  return Cookies.get(TokenKey);
}
/**
 * 设置token
 * @param token 指令密钥
 */
export function setToken(token: string) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}
